<?php include("src/updateParafiscalCompany_cs.php"); ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link href="css/style.css" rel="stylesheet" type="text/css" />
<link href='css/coolMessage.css' type='text/css' rel='stylesheet' media='screen' />
<title>Actualizar Parafiscal :: ASSC</title>
<script language="javaScript" type="text/javascript" src="js/jquery.js"></script>
<script language="javaScript" type="text/javascript" src="js/jquery.simplemodal.js"></script>
<script language="javaScript" type="text/javascript" src="js/coolMessage.js"></script>
<script language="javascript" type="text/javascript">

	
	function showMessage(show_msg){
		switch(show_msg){
			case 1://error
				coolMessage('error',"<?php echo $_SESSION["msg_cool"];?>");
			break;
			
			case 2://alert
				coolMessage('alert',"<?php echo $_SESSION["msg_cool"];?>");
			break;
			
			case 3://information
				coolMessage('information',"<?php echo $_SESSION["msg_cool"];?>");
			break;
			
			default:
				
			break;
		}
		return false;
	}
	
	function validate(){
		var msg    = '';
		
		var name   			= document.getElementById("paco_name").value;
		var porc   	= document.getElementById("paco_porc").value;
	
		if(name == '') 
			msg='- Por favor entre el nombre del parafiscal. \n';
		
		if(porc == '') 
			msg='- Por favor entre el porcentaje del parafiscal. \n';
		
		if(msg==''){
			document.getElementById('form').submit();
			return true;
		}
		else{
			alert(msg);
			return false;
		}		
	}
	

	
	function onlyNumbers(e)
	{
	   var key;
	   if(window.event)
		  key = window.event.keyCode;   //IE
	   else
		  key = e.which;                //firefox
	   if (!( (key >= 48 && key <= 57) || key ==8 || key ==9 || key ==0 || key ==46 ))
		  return false;
	   else
		  return true;
	}	
	
	

</script>
</head>
<body onload="javascript: showMessage(<?php echo $show_msg;?>)">
<?php $item_select = 11; include("menu.php");?><br />
    <form name="form" id="form" method="post" action="" enctype="multipart/form-data">
    <input type="hidden" name="edit" id="edit" value="1"/>
    <input type="hidden" name="paco_code" id="paco_code" value="<?php echo $paco_code;?>" />
	<input type="hidden" name="countTelephones" id="countTelephones" value="<?php echo $countTelephones;?>" />
    <div class="content_grv">
    	<table width="80%" align="center" class="shadow">
        	<tr>
            	<td class="title">Editar Parafiscal Company</td>
            </tr>
            <tr>
            	<td>
                	<table class="tbl_form" align="center">
                        <tr>
                        	<td width="35%" align="right"><span class="lbl_gray">Parafiscal:</span></td>
                            <td width="1%">&nbsp;</td>
                            <td><input type="text" name="paco_name" id="paco_name" class="text_grv" size="51" maxlength="50" value="<?php echo $data->paco_name;?>" /></td>
                        </tr>
                        <tr>
                        	<td align="right"><span class="lbl_gray">Porcentaje:</span></td>
                            <td>&nbsp;</td>
                            <td><input type="text" name="paco_porc" id="paco_porc" class="text_grv" size="21" maxlength="20" value="<?php echo $data->paco_porc;?>" /></td>
                        </tr>
                        <tr>
                  		<tr>
                        	<td colspan="3" align="center">&nbsp;</td>
                        </tr>
                        <tr>
                        	<td colspan="3" align="center">
                            <input type="button" class="button_grv" value="Save" onclick="javascript: return validate();" />
                            <input type="button" class="button_grv" value="Cancel" onClick="javascript:window.history.back(-1);" /></td>
                        </tr>
                    </table>
                </td>
            </tr>
        </table>
    </div>
</form>    
</body>
</html>
<?php include('divscoolmessage.php');?>